package com.liao.jta_jpa.dao.test;

import com.liao.jta_jpa.pojo.test.TbUser;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;

public interface UserDao extends CrudRepository<TbUser,Integer> {

    @Query("update TbUser set password = ?2 where id = ?1")
    @Modifying
    Integer updateData(Integer id,String password);
}
